Skip to main content

All Questions

0votes
1answer
335views

Multiple models in one view ASP.net core mvc

Good day. I encountered a problem while developing an asp.net core mvc application. The fact is that I have a Dashboard page for which the data is taken from the @model DashboardPageViewModel. Also, ...
ch0va's user avatar
0votes
0answers
32views

MVC passing value from button to controller

Hi i have a problem passing values from View to controller I have a set of rendered buttons: <div class="text-center"> <form method="post"> @{ var ...
Mariusz's user avatar
0votes
0answers
81views

How to return a view as string value for an integer input

Example: The value store in database is 1 and the view for that must be like "Leave form" how can I set this in asp.net MVC .
vaseem's user avatar
0votes
0answers
5kviews

Check if the entered OTP Code is right and within 30 seconds in ASP.NET Core MVC

I'm building an ASP.NET Core MVC Application in which when the user clicks on "Generate OTP" then a 4 digit OTP is shown to him on the screen and then he has to enter that OTP in an input ...
Kamran Bajwa's user avatar
0votes
1answer
39views

Can't get new controller or view to work in ASP.Net MVC

I'm making an project for a online car dealership, for a final exam in ASP.NET. I created a new project, but when i click to edit an item in the site, it just opens the path to the View for editing, ...
vMarkow's user avatar
0votes
1answer
515views

.Net ViewModel not updating on page refresh

I have been trying to find a solution to this online such as here and here. But they don't seem to help me as it appears that my GET is not updating my view model on page load, whereas those offer an ...
DMur's user avatar
  • 659
0votes
1answer
740views

Access variable of one controller from another view in ASP.NET Core MVC

I am trying build a project while self learning but have been stuck in one place. I have this class Roles: namespace IC2021.Models { public partial class Roles { public Roles() ...
Ritcus's user avatar
1vote
0answers
44views

I send information from the view for controller using html.beginform and it changes the whole view of the page - ASP.NET

I want to send information to controller and I use html.beginform, but this function changes the whole view of page(cshtmlenter image description here). I tried to change the place of the brackets, ...
RotemLibrati's user avatar
1vote
1answer
2kviews

How to pass value selected from DropDownList to Controller - MVC

I am having trouble getting the value selected in my dropdownlist in my Homecontroller. I have the DropDownList in a form but I think my format may be wrong. I'm new to MVC and new to HTML so I'm ...
ana steele's user avatar
2votes
1answer
389views

How can I initialize one model in another model's controller action?

I created a web-app in Asp.net MVC and it has an order action. I have these two models for Order public class Order { public int Id { get; set; } public DateTimeOffset OrderTime {...
Gulzhanat Zhumazhanova's user avatar
1vote
1answer
636views

How to handle multiple buttons with Input in Razor view Using ASP.Net MVC?

I saw many post regarding multiple button calling Action method, But those are all without Input. I have Razor View. It will generate multiple Inputs and Buttons Example Item View @foreach (var item ...
Liam neesan's user avatar
0votes
1answer
110views

How to select some column in huge table which contain null data in some row and use distinict in column

I have huge table which contains some column null data but I don't want to change anything in table. In one of my view I want to select just two column to display in the page, first is ID and second ...
Miad BayaniRad's user avatar
1vote
2answers
4kviews

In ASP.NET MVC, how does a controller know which view to call?

This may sound like a dumb question, I'm a fairly experienced programmer but I'm brand new to .NET and MVC. In a class I was taking, we have a controller class (Homecontroller.cs) I understand that ...
David Britz's user avatar
0votes
1answer
48views

Tuple Problem @model Tuple<HabasPortal.Models.Profile,List<SelectListItem>>

I use database first on my project.I wil save to Profile table and fill a dropdown from department table on this page . How do I use both profile.cs and department.cs in a view in Profile.cshtml? It ...
Murat Onuk's user avatar
0votes
2answers
4kviews

View - dynamic model

I am attempting to create a dynamic table in my view that will be dynamically generated depending on the type of model I send to the view. So, I basically have two actions: public IActionResult ...
Johntra's user avatar

153050per page
close